const fileReader = require('../fileReader')
const execSync = require('child_process').execSync

const baseDir = '/root/scripts/'

function update () {
    let cmd = 'cd ' + baseDir + '; /bin/bash update_note.sh'
    return execSync(cmd).toString().trim()
}


module.exports = function (request, response) {
    response.writeHead(200, {'Content-Type': 'text/plain;charset=utf-8'})
    response.write(update())
    response.end()
}
